package com.learn.training.multithread.chapter7.demo1;

public class Task implements Runnable {

    private final String name;
    public Task(String name) {
        this.name = name;
    }


    @Override
    public void run() {
        System.out.println("start task" + name + "  " + Thread.currentThread().getName());
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
        }
        System.out.println("end task " + name);

    }
}
